package com.ruoyi.pcj.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsJoinTable;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.pcj.constant.TbConstant;
import lombok.Data;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 聊天-好友列信息设置对象 pcj_lt_friend_setting
 *
 * @author ms
 * @date 2024-03-28
 */
@Data
@TableName("pcj_lt_friend_setting")
public class PcjLtFriendSetting extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId
    @TableField("id")
    private String id;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;


    /**
     * 用户id
     */
    @MsJoinTable(joinTable = TbConstant.sysUser, joinField = "user_id", needFields = {"nick_name@userName"})
    @TableField("user_id")
    private Long userId;
    @TableField(exist = false)
    private String userName;


    /**
     * 好友的id
     */
    @MsJoinTable(joinTable = TbConstant.sysUser, joinField = "user_id", needFields = {"nick_name@friendName"})
    @TableField("friend_id")
    private Long friendId;
    @TableField(exist = false)
    private String friendName;

    /**
     * 好友状态,0-陌生人，1-好友，2-拉黑
     */
    @TableField("status")
    private String status;


    /**
     * 用户备注
     */
    @TableField("friend_alias")
    private String friendAlias;


    /**
     * 是否特别关心0-否，1-是。优先展示
     */
    @TableField("particular_concern")
    private String particularConcern;
    /**
     * 是否存在会话，0-不存在，1-存在
     */
    @TableField("session_status")
    private String sessionStatus;

    /**
     * 聊天会话排序
     */
    @TableField("session_seq_no")
    private Integer sessionSeqNo;
    /**
     * 成为好友的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("add_time")
    private Date addTime;

    /**
     * 最新一条发送/接受消息的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("new_msg_time")
    private Date newMsgTime;


    /**
     *最新一条消息id
     */
    @TableField("new_msg_id")
    private String newMsgId;

}
